#ifndef WIDGET_H
#define WIDGET_H

#include <QSerialPort>
#include <QWidget>
#include "qtablewidget.h"
#include "virtualserial.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget( QWidget *parent = nullptr );
    ~Widget();

private slots:
    void on_pushButton_clicked();
    void onSerialReadyRead();

    void on_comboBox_currentIndexChanged( int index );

    void on_tableWidget_itemChanged( QTableWidgetItem *item );

private:
    //    QByteArray stringToByteArray( const QString &str );

private:
    VirtualSerial *_virtual_serial;

private:
    Ui::Widget *ui;
};
#endif  // WIDGET_H
